\documentclass[twoside,a4paper]{article}
\usepackage{geometry}
\geometry{margin=1.5cm, vmargin={0pt,1cm}}
\setlength{\topmargin}{-1cm}
\setlength{\paperheight}{29.7cm}
\setlength{\textheight}{25.3cm}

% useful packages.
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{layout}

% some common command
\newcommand{\dif}{\mathrm{d}}
\newcommand{\avg}[1]{\left\langle #1 \right\rangle}
\newcommand{\difFrac}[2]{\frac{\dif #1}{\dif #2}}
\newcommand{\pdfFrac}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\OFL}{\mathrm{OFL}}
\newcommand{\UFL}{\mathrm{UFL}}
\newcommand{\fl}{\mathrm{fl}}
\newcommand{\op}{\odot}
\newcommand{\Eabs}{E_{\mathrm{abs}}}
\newcommand{\Erel}{E_{\mathrm{rel}}}

\begin{document}

\pagestyle{fancy}
\fancyhead{}
\lhead{Chenyue (22035026)}
\chead{math story two}
\rhead{2021/1/19}

\section*{I. The result of the program.}
See behind.
\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_B1}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_B2}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_B3}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_B4}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_M2}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_M3}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_M4}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{A_M5}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{BDFs1}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{BDFs2}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{BDFs3}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{BDFs4}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=20cm]{R_K}
\end{figure}

\section*{II. Story.}
Given $T>0, \mathbf{f}: \mathbb{R}^{N} \times[0, T] \rightarrow \mathbb{R}^{N},$ and
$\mathbf{u}_{0} \in \mathbb{R}^{N},$ the initial value problem $(\mathrm{IVP})$ is to find $\mathbf{u}(t) \in \mathcal{C}^{1}$
such that
$$
\left\{\begin{aligned}
\mathbf{u}(0) &=\mathbf{u}_{0} \\
\mathbf{u}^{\prime}(t) &=\mathbf{f}(\mathbf{u}(t), t), \forall t \in[0, T] .
\end{aligned}\right.
$$

For solving the IVP $(8.3),$ an $s$ -step linear multistep method (LMM) has the form
$$
\sum_{j=0}^{s} \alpha_{j} \mathbf{U}^{n+j}=k \sum_{j=0}^{s} \beta_{j} \mathbf{f}\left(\mathbf{U}^{n+j}, t_{n+j}\right)
$$
where $\alpha_{s}=1$ is assumed WLOG.

An Adams formula is an LMM of the form
$$
\mathbf{U}^{n+s}=\mathbf{U}^{n+s-1}+k \sum_{j=0}^{s} \beta_{j} \mathbf{f}\left(\mathbf{U}^{n+j}, t_{n+j}\right)
$$
where $\beta_{j}$ 's are chosen to maximize the order of accuracy.
An Adams-Bashforth formula is an Adams formula with $\beta_{s}=0 .$ An A dams-Moulton formula is an Adams formula with $\beta_{s} \neq 0$.

A backward differentiation formula (BDF) is an LMM of the form
$$
\sum_{j=0}^{s} \alpha_{j} \mathbf{U}^{n+j}=k \mathbf{f}\left(\mathbf{U}^{n+s}, t_{n+s}\right)
$$
where $\alpha_{j}$ 's are chosen to give order $s$.

The classical fourth-order Runge-Kutta method is a one-step method of the form
$$
\left\{\begin{array}{l}
y_{1}=f\left(U^{n}, t_{n}\right) \\
y_{2}=f\left(U^{n}+\frac{k}{2} y_{1}, t_{n}+\frac{k}{2}\right) \\
y_{3}=f\left(U^{n}+\frac{k}{2} y_{2}, t_{n}+\frac{k}{2}\right) \\
y_{4}=f\left(U^{n}+k y_{3}, t_{n}+k\right) \\
U^{n+1}=U^{n}+\frac{k}{6}\left(y_{1}+2 y_{2}+2 y_{3}+y_{4}\right)
\end{array}\right.
$$

Of our four methods, two are explicit and two are invisible.Since the implicit method needs Newton iteration to solve nonlinear equations, the implicit method has much more computation than the explicit method.And the convergence order of each method is not the same, so we will take different time steps for different methods.

Next, we show two cases most similar to the exact solution.
(See behind)

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=18cm]{rk40000}
\caption{rk situation1 40000}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=18cm]{2rk10000}
\caption{rk situation2 10000}
\end{figure}

Then we show the 24000 step Euler method and the 6000 step rk method.(See behind)

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=18cm]{eu24000}
\caption{eu situation1 24000}
\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=16cm,height=18cm]{rk6000}
\caption{rk situation1 6000}
\end{figure}

By comparison, we can know that under the condition that the error of the maximum norm of the solution is less than 1e-3, the total CPU time of the Eulerian method is shorter.

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 